/**
 * 2011-11-17下午4:38:18
 */
package dao;

import java.sql.ResultSet;
import java.sql.SQLException;

import util.MysqlConn;

/**
 * @author Baicai 查询符合条件的商品数量
 */
public class GetGoodsCount {
	public static int getCount(String string) {
		MysqlConn.setSqlString(string);
		ResultSet resultSet;
		try {
			resultSet = MysqlConn.queryDB();
			resultSet.next();
			int count = resultSet.getInt(1);
			return count;
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} finally {
			MysqlConn.free();
		}
		return 0;
	}
}
